'use strict';
let Koa=require('koa');
let bodyParser=require('koa-bodyparser');
let temp=require('./templating');
let controller=require('./controllers');
let staticRes=require('koa-static');
let app=new Koa();
app.use(temp);
app.use(bodyParser());
app.use(controller());
app.use(staticRes(__dirname+'/static'));
app.use(async(context,next)=>{
    context.render('index.html');
})
let port=8000;
app.listen(port,()=>{
    console.log(`http://127.0.0.1:${port}`);
})